package com.hl.secondHand.controller;

import org.apache.shiro.authc.ExpiredCredentialsException;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 拦截器中的异常无法被全局异常捕获，将其引入本方法
 */
@RestController
@RequestMapping("/error")
public class ErrorController {

    @RequestMapping("/token")
    public void rethrow(){
        throw new ExpiredCredentialsException("token错误或已失效！");
    }
}
